﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Call
{
    class Girl
    {
        private string name;
        private int age;
        private int height;
        //设置名字属性
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }
        //设置年龄属性
        public int Age
        {
            get
            {
                return age;
            }
            set
            {
                if(value>=0)
                {
                    age = value;
                }
                else
                {
                    age = 0;
                }
            }
        }
        //设置身高属性
        public int Height
        {
            get
            {
                return height;
            }
            set
            {
                height = value;
            }
        }
        public void GirlInfo()
        {
            Console.WriteLine("有一个女孩叫{0}，她今年{1}岁了，她身高{2}",name,age,height);
        }
    }
}
